# coding=utf8

# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# NOTE: This class is auto generated by the jdcloud code generator program.

from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest


class DescribeMetricsRequest(JDCloudRequest):
    """
    根据产品线查询可用监控项列表,metric介绍：<a href="https://docs.jdcloud.com/cn/monitoring/metrics">Metrics</a>
    """

    def __init__(self, parameters, header=None, version="v2"):
        super(DescribeMetricsRequest, self).__init__(
            '/metrics', 'GET', header, version)
        self.parameters = parameters


class DescribeMetricsParameters(object):

    def __init__(self, serviceCode, ):
        """
        :param serviceCode: 资源的类型，取值vm, lb, ip, database 等。<a href="https://docs.jdcloud.com/cn/monitoring/api/describeservices?content=API&SOP=JDCloud">describeServices</a>：查询己接入云监控的产品线列表
        """

        self.serviceCode = serviceCode
        self.dimension = None
        self.type = None

    def setDimension(self, dimension):
        """
        :param dimension: (Optional) 
        """
        self.dimension = dimension

    def setType(self, type):
        """
        :param type: (Optional) metric的类型，取值0(控制台展示)、1(内部使用，控制台不展示)、2(所有).默认取0
        """
        self.type = type

